﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reactive.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace RxFormsTestbed
{
    public partial class UnifiedProgrammingModel : Form
    {
        public UnifiedProgrammingModel()
        {
            InitializeComponent();
        }

        private void UnifiedProgrammingModel_Load(object sender, EventArgs e)
        {
            var res = from evt in Observable.FromEventPattern(textBox1, "TextChanged")
                      select ((TextBox) evt.Sender).Text;

            res.Subscribe(s => this.Text = s);
        }
    }
}
